package com.easy.frame.servers.sys.vo;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.easy.frame.base.basic.NameTag;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import java.util.Date;
import java.util.List;

/**
 * 项目权限表分页返回对象
 *
 * @author tp
 * @date 2021/1/15 11:45
 */
@Setter
@Getter
@ToString
@NoArgsConstructor
@AllArgsConstructor
public class SysProjectAuthVO implements NameTag {

    private Long id;

    @ApiModelProperty("项目ID")
    private Long projectId;

    @ApiModelProperty("项目名称")
    private String projectCode;

    @ApiModelProperty("租户id")
    private Long tenantId;

    @ApiModelProperty("授权企业及机构")
    private String tenantName;

    @ApiModelProperty("项目名称")
    private String projectName;

    @ApiModelProperty("业务类型")
    private String businessTypes;

    @ApiModelProperty("业务类型名称集合")
    private List<String> businessTypeList;

    @ApiModelProperty("是否过期[0未过期，1已过期]")
    private Boolean isOverdue;

    @ApiModelProperty("设置项目告警天数，单位默认是天")
    private Integer overdueTime;

    @ApiModelProperty("是否对外授权[0未授权，1已授权]")
    private Boolean isExternalAuth;

    @ApiModelProperty("对外授权的供应商（tenantId的type是3的租户）")
    private String supplier;

    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty("创建人")
    private Long createBy;

    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty("创建时间")
    private Date createTime;

    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty("授权开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date authStartTime;

    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty("授权结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date authEndTime;

    @ApiModelProperty("创建人名")
    private String createByName;

    @ApiModelProperty("修改人")
    private Long updateBy;

    @ApiModelProperty("修改人名")
    private String updateByName;

    @ApiModelProperty("备注")
    private String remark;

    @ApiModelProperty("修改时间")
    @TableField(fill = FieldFill.INSERT)
    private Date updateTime;
}
